package weathercrowd.model;

import java.util.Date;

import javax.persistence.*;

@Entity
@Table(name="public.temperature")
@Inheritance(strategy=InheritanceType.JOINED)
public class Temperature {
	long	id;
	Date 	date;
	float	min;
	float	max;
	Location location;
	
	public Temperature() {
	}

	@Id
	@Column(name="id",nullable=false)
	public long getId() {
		return id;
	}

	public void setId(long id) {
		this.id = id;
	}
	
	@Column(name="date")	
	public Date getDate() {
		return date;
	}

	public void setDate(Date date) {
		this.date = date;
	}

	@Column(name="min")	
	public float getMin() {
		return min;
	}

	public void setMin(float min) {
		this.min = min;
	}

	@Column(name="max")	
	public float getMax() {
		return max;
	}

	public void setMax(float max) {
		this.max = max;
	}

	@ManyToOne()
	@JoinColumn(name="location")
	public Location getLocation() {
		return location;
	}

	public void setLocation(Location location) {
		this.location = location;
	}
}
